3.105 \(\int \frac{\tan ^3(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{5/2}} \, dx\)

Optimal. Leaf size=211 \[ \frac{(13 A+83 i B) \sqrt{a+i a \tan (c+d x)}}{30 a^3 d}+\frac{41 A+151 i B}{60 a^2 d \sqrt{a+i a \tan (c+d x)}}+\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{4 \sqrt{2} a^{5/2} d}+\frac{(-B+i A) \tan ^3(c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac{(7 A+17 i B) \tan ^2(c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}} \]

[Out]

((A - I*B)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/(4*Sqrt[2]*a^(5/2)*d) + ((I*A - B)*Tan[c + d
*x]^3)/(5*d*(a + I*a*Tan[c + d*x])^(5/2)) + ((7*A + (17*I)*B)*Tan[c + d*x]^2)/(30*a*d*(a + I*a*Tan[c + d*x])^(
3/2)) + (41*A + (151*I)*B)/(60*a^2*d*Sqrt[a + I*a*Tan[c + d*x]]) + ((13*A + (83*I)*B)*Sqrt[a + I*a*Tan[c + d*x
]])/(30*a^3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.568629, antiderivative size = 211, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.139, Rules used = {3595, 3592, 3526, 3480, 206} \[ \frac{(13 A+83 i B) \sqrt{a+i a \tan (c+d x)}}{30 a^3 d}+\frac{41 A+151 i B}{60 a^2 d \sqrt{a+i a \tan (c+d x)}}+\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{4 \sqrt{2} a^{5/2} d}+\frac{(-B+i A) \tan ^3(c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac{(7 A+17 i B) \tan ^2(c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[(Tan[c + d*x]^3*(A + B*Tan[c + d*x]))/(a + I*a*Tan[c + d*x])^(5/2),x]

[Out]

((A - I*B)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/(4*Sqrt[2]*a^(5/2)*d) + ((I*A - B)*Tan[c + d
*x]^3)/(5*d*(a + I*a*Tan[c + d*x])^(5/2)) + ((7*A + (17*I)*B)*Tan[c + d*x]^2)/(30*a*d*(a + I*a*Tan[c + d*x])^(
3/2)) + (41*A + (151*I)*B)/(60*a^2*d*Sqrt[a + I*a*Tan[c + d*x]]) + ((13*A + (83*I)*B)*Sqrt[a + I*a*Tan[c + d*x
]])/(30*a^3*d)

Rule 3595

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Simp[((A*b - a*B)*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n)/(2*a*f*
m), x] + Dist[1/(2*a^2*m), Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^(n - 1)*Simp[A*(a*c*m + b*d*n
) - B*(b*c*m + a*d*n) - d*(b*B*(m - n) - a*A*(m + n))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A,
B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] && GtQ[n, 0]

Rule 3592

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(B*d*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Int[(a + b*Tan[e
 + f*x])^m*Simp[A*c - B*d + (B*c + A*d)*Tan[e + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b
*c - a*d, 0] &&  !LeQ[m, -1]

Rule 3526

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[((
b*c - a*d)*(a + b*Tan[e + f*x])^m)/(2*a*f*m), x] + Dist[(b*c + a*d)/(2*a*b), Int[(a + b*Tan[e + f*x])^(m + 1),
 x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0]

Rule 3480

Int[Sqrt[(a_) + (b_.)*tan[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[(-2*b)/d, Subst[Int[1/(2*a - x^2), x], x, Sq
rt[a + b*Tan[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\tan ^3(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{5/2}} \, dx &=\frac{(i A-B) \tan ^3(c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}-\frac{\int \frac{\tan ^2(c+d x) \left (3 a (i A-B)+\frac{1}{2} a (A+11 i B) \tan (c+d x)\right )}{(a+i a \tan (c+d x))^{3/2}} \, dx}{5 a^2}\\ &=\frac{(i A-B) \tan ^3(c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac{(7 A+17 i B) \tan ^2(c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac{\int \frac{\tan (c+d x) \left (-a^2 (7 A+17 i B)+\frac{1}{4} a^2 (13 i A-83 B) \tan (c+d x)\right )}{\sqrt{a+i a \tan (c+d x)}} \, dx}{15 a^4}\\ &=\frac{(i A-B) \tan ^3(c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac{(7 A+17 i B) \tan ^2(c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac{(13 A+83 i B) \sqrt{a+i a \tan (c+d x)}}{30 a^3 d}+\frac{\int \frac{-\frac{1}{4} a^2 (13 i A-83 B)-a^2 (7 A+17 i B) \tan (c+d x)}{\sqrt{a+i a \tan (c+d x)}} \, dx}{15 a^4}\\ &=\frac{(i A-B) \tan ^3(c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac{(7 A+17 i B) \tan ^2(c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac{41 A+151 i B}{60 a^2 d \sqrt{a+i a \tan (c+d x)}}+\frac{(13 A+83 i B) \sqrt{a+i a \tan (c+d x)}}{30 a^3 d}+\frac{(i A+B) \int \sqrt{a+i a \tan (c+d x)} \, dx}{8 a^3}\\ &=\frac{(i A-B) \tan ^3(c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac{(7 A+17 i B) \tan ^2(c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac{41 A+151 i B}{60 a^2 d \sqrt{a+i a \tan (c+d x)}}+\frac{(13 A+83 i B) \sqrt{a+i a \tan (c+d x)}}{30 a^3 d}+\frac{(A-i B) \operatorname{Subst}\left (\int \frac{1}{2 a-x^2} \, dx,x,\sqrt{a+i a \tan (c+d x)}\right )}{4 a^2 d}\\ &=\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{4 \sqrt{2} a^{5/2} d}+\frac{(i A-B) \tan ^3(c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac{(7 A+17 i B) \tan ^2(c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac{41 A+151 i B}{60 a^2 d \sqrt{a+i a \tan (c+d x)}}+\frac{(13 A+83 i B) \sqrt{a+i a \tan (c+d x)}}{30 a^3 d}\\ \end{align*}

Mathematica [A]  time = 4.2232, size = 193, normalized size = 0.91 \[ -\frac{15 (A-i B) e^{5 i (c+d x)} \sqrt{1+e^{2 i (c+d x)}} \sinh ^{-1}\left (e^{i (c+d x)}\right )+A \left (-16 e^{2 i (c+d x)}+64 e^{4 i (c+d x)}+83 e^{6 i (c+d x)}+3\right )+i B \left (-26 e^{2 i (c+d x)}+194 e^{4 i (c+d x)}+463 e^{6 i (c+d x)}+3\right )}{15 a^2 d \left (1+e^{2 i (c+d x)}\right )^3 (\tan (c+d x)-i)^2 \sqrt{a+i a \tan (c+d x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(Tan[c + d*x]^3*(A + B*Tan[c + d*x]))/(a + I*a*Tan[c + d*x])^(5/2),x]

[Out]

-(A*(3 - 16*E^((2*I)*(c + d*x)) + 64*E^((4*I)*(c + d*x)) + 83*E^((6*I)*(c + d*x))) + I*B*(3 - 26*E^((2*I)*(c +
 d*x)) + 194*E^((4*I)*(c + d*x)) + 463*E^((6*I)*(c + d*x))) + 15*(A - I*B)*E^((5*I)*(c + d*x))*Sqrt[1 + E^((2*
I)*(c + d*x))]*ArcSinh[E^(I*(c + d*x))])/(15*a^2*d*(1 + E^((2*I)*(c + d*x)))^3*(-I + Tan[c + d*x])^2*Sqrt[a +
I*a*Tan[c + d*x]])

________________________________________________________________________________________

Maple [A]  time = 0.03, size = 142, normalized size = 0.7 \begin{align*} -2\,{\frac{1}{{a}^{3}d} \left ( -iB\sqrt{a+ia\tan \left ( dx+c \right ) }-1/8\,{\frac{a \left ( 7\,A+17\,iB \right ) }{\sqrt{a+ia\tan \left ( dx+c \right ) }}}+1/12\,{\frac{{a}^{2} \left ( 5\,A+7\,iB \right ) }{ \left ( a+ia\tan \left ( dx+c \right ) \right ) ^{3/2}}}-1/10\,{\frac{{a}^{3} \left ( A+iB \right ) }{ \left ( a+ia\tan \left ( dx+c \right ) \right ) ^{5/2}}}-1/16\,\sqrt{a} \left ( A-iB \right ) \sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{a+ia\tan \left ( dx+c \right ) }\sqrt{2}}{\sqrt{a}}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^3*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^(5/2),x)

[Out]

-2/d/a^3*(-I*B*(a+I*a*tan(d*x+c))^(1/2)-1/8*a*(7*A+17*I*B)/(a+I*a*tan(d*x+c))^(1/2)+1/12*a^2*(5*A+7*I*B)/(a+I*
a*tan(d*x+c))^(3/2)-1/10*a^3*(A+I*B)/(a+I*a*tan(d*x+c))^(5/2)-1/16*a^(1/2)*(A-I*B)*2^(1/2)*arctanh(1/2*(a+I*a*
tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2)))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^3*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^(5/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.05867, size = 1100, normalized size = 5.21 \begin{align*} \frac{{\left (15 \, \sqrt{\frac{1}{2}} a^{3} d \sqrt{\frac{A^{2} - 2 i \, A B - B^{2}}{a^{5} d^{2}}} e^{\left (6 i \, d x + 6 i \, c\right )} \log \left (\frac{{\left (2 i \, \sqrt{\frac{1}{2}} a^{3} d \sqrt{\frac{A^{2} - 2 i \, A B - B^{2}}{a^{5} d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt{2}{\left ({\left (i \, A + B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + i \, A + B\right )} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) - 15 \, \sqrt{\frac{1}{2}} a^{3} d \sqrt{\frac{A^{2} - 2 i \, A B - B^{2}}{a^{5} d^{2}}} e^{\left (6 i \, d x + 6 i \, c\right )} \log \left (\frac{{\left (-2 i \, \sqrt{\frac{1}{2}} a^{3} d \sqrt{\frac{A^{2} - 2 i \, A B - B^{2}}{a^{5} d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt{2}{\left ({\left (i \, A + B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + i \, A + B\right )} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) + \sqrt{2}{\left ({\left (83 \, A + 463 i \, B\right )} e^{\left (6 i \, d x + 6 i \, c\right )} + 2 \,{\left (32 \, A + 97 i \, B\right )} e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \,{\left (8 \, A + 13 i \, B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + 3 \, A + 3 i \, B\right )} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-6 i \, d x - 6 i \, c\right )}}{120 \, a^{3} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^3*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^(5/2),x, algorithm="fricas")

[Out]

1/120*(15*sqrt(1/2)*a^3*d*sqrt((A^2 - 2*I*A*B - B^2)/(a^5*d^2))*e^(6*I*d*x + 6*I*c)*log((2*I*sqrt(1/2)*a^3*d*s
qrt((A^2 - 2*I*A*B - B^2)/(a^5*d^2))*e^(2*I*d*x + 2*I*c) + sqrt(2)*((I*A + B)*e^(2*I*d*x + 2*I*c) + I*A + B)*s
qrt(a/(e^(2*I*d*x + 2*I*c) + 1))*e^(I*d*x + I*c))*e^(-I*d*x - I*c)/(I*A + B)) - 15*sqrt(1/2)*a^3*d*sqrt((A^2 -
 2*I*A*B - B^2)/(a^5*d^2))*e^(6*I*d*x + 6*I*c)*log((-2*I*sqrt(1/2)*a^3*d*sqrt((A^2 - 2*I*A*B - B^2)/(a^5*d^2))
*e^(2*I*d*x + 2*I*c) + sqrt(2)*((I*A + B)*e^(2*I*d*x + 2*I*c) + I*A + B)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*e^(
I*d*x + I*c))*e^(-I*d*x - I*c)/(I*A + B)) + sqrt(2)*((83*A + 463*I*B)*e^(6*I*d*x + 6*I*c) + 2*(32*A + 97*I*B)*
e^(4*I*d*x + 4*I*c) - 2*(8*A + 13*I*B)*e^(2*I*d*x + 2*I*c) + 3*A + 3*I*B)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*e^
(I*d*x + I*c))*e^(-6*I*d*x - 6*I*c)/(a^3*d)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**3*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))**(5/2),x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{3}}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac{5}{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^3*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^(5/2),x, algorithm="giac")

[Out]

integrate((B*tan(d*x + c) + A)*tan(d*x + c)^3/(I*a*tan(d*x + c) + a)^(5/2), x)